package cn.dai.dao;

import cn.dai.pojo.RoleMenuMap;
import cn.dai.util.JdbcUtils;

import java.util.List;

/**
 * @author ArkD42
 * @file RBAC
 * @create 2020 - 06 - 13 - 21:21
 */
public class RoleMenuMapDaoImpl implements RoleMenuMapDao {

    @Override
    public List<RoleMenuMap> queryRmMapByRidAndStatus1(Integer roleId) {
        final String sql = "SELECT * FROM `rm_map` WHERE `role_id` = ? AND `rm_status` = 1";

        return JdbcUtils.queryToList(
                JdbcUtils.getConnection(),
                RoleMenuMap.class,
                sql,
                new Object[]{roleId}
        );
    }
}
